<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>
    <xsl:template match="list">
        <html>
            <body>
                <xsl:for-each select="entry"> 
                    <xsl:value-of select="@name"/> 
                    <xsl:if test="not (position()=last())">
                        <xsl:text>, </xsl:text>
                    </xsl:if>  
                    <xsl:if test="position()=last()">
                        <xsl:text>. </xsl:text>
                    </xsl:if>  
                </xsl:for-each>
            </body>
        </html>
    </xsl:template>

</xsl:stylesheet>
